<!DOCTYPE html>
<html>
<head>
    <title>线下外协商</title>
		<#include "/header.html">
</head>
<style>
    #rrapp .el-cascader{
        width: 100%;
    }
</style>
<body>
<div id="rrapp" v-cloak>

    <div v-show="showList">

        <!-- 查询 start -->
        <div class="grid-btn">
            <div class="grid-btn">
                <form class="form-inline" role="form">
                    <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>

                    <div class="form-group">
                        <input type="text" class="form-control input-sm" v-model.trim="q.supplierName" @keyup.enter="query" placeholder="外协商名称">
                    </div>&nbsp;&nbsp;&nbsp;

                    <div class="form-group">
                        <input type="text" class="form-control input-sm" v-model.trim="q.contactName" @keyup.enter="query" placeholder="联系人">
                    </div>&nbsp;&nbsp;&nbsp;
                   <!-- <div class="form-group">
                        <select class="form-control input-sm" v-model="q.state" @keyup.enter="query">
                            <option value="">审核状态</option>
                            <option v-for="item in e.erpSupplierStateEnum" :value="item.id">{{item.describe}}</option>
                        </select>
                    </div>&nbsp;&nbsp;&nbsp;-->

                    <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>

                    <#if shiro.hasPermission("erpSupplierOffline:erpsupplieroffline:save")>
                        <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                    </#if>
                    <#if shiro.hasPermission("erpSupplierOffline:erpsupplieroffline:update")>
                        <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                    </#if>
                   <!-- <#if shiro.hasPermission("suppOffline:erpsupplieroffline:delete")>
                        <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                    </#if>-->
                </form>
            </div>
        </div>
        <!-- 查询 end -->
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
                <div class="form-group">
                    <div class="col-sm-2 control-label"><span style="color: red">* </span>外协商名称</div>
                    <div class="col-sm-10">
                        <input type="text" :disabled="updateFlag" class="form-control input-sm" v-model="erpSupplierOffline.supplierName" placeholder="外协商名称"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><span style="color: red">* </span>联系人</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control input-sm" v-model="erpSupplierOffline.contactName" placeholder="联系人"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><span style="color: red">* </span>联系人电话</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control input-sm" v-model="erpSupplierOffline.contactTel" placeholder="联系人电话"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><span style="color: red">* </span>省市区</div>
                    <div class="col-sm-10">
                        <el-cascader size="mini" placeholder="试试搜索：武汉市" v-model="areaCascader" :options="options" filterable @change="handleItemChange"></el-cascader>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label"><span style="color: red">* </span>详细地址</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control input-sm" v-model="erpSupplierOffline.contactAddr" placeholder="详细地址"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label">备注</div>
                    <div class="col-sm-10">
                        <input type="text" class="form-control input-sm" v-model="erpSupplierOffline.remarks" placeholder="备注"/>
                    </div>
                </div>

					<div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <input type="button" class="btn btn-primary  btn-sm" @click="saveOrUpdate" value="确定"/>
                        &nbsp;&nbsp;
                        <input type="button" class="btn btn-warning  btn-sm" @click="reload" value="返回"/>
                    </div>
        </form>
    </div>

    <!-- 审核 -->
    <el-dialog title="审核" :visible.sync="auditFormVisible" width= "30%">

        <el-form size="medium">
            <el-form-item label="驳回备注" :label-width="formLabelWidth">
                <el-input type="textarea" v-model.trim="audit.auditRemark"></el-input>
            </el-form-item>
        </el-form>

        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="auditReject">驳回</el-button>
            <el-button size="small" @click="auditSuccess" type="primary">通过</el-button>
        </div>
    </el-dialog>

</div>

<script src="${request.contextPath}/statics/js/modules/erpSupplierOffline/erpsupplieroffline.js?_${.now?long}"></script>
</body>
</html>